package com.fan.dao;

import com.fan.pojo.Cart;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

    Cart selectCarByUserIdProuctId(@Param("userId")Integer userId,@Param("productId") Integer productId);

    List<Cart> selectCartByUserId(Integer userId);


    int selectCartProductCheckedStatusByUserId(Integer userId);

    int deleteByUserIdProductIds(@Param("userId") Integer userId,@Param("productId")
                                 List<String> productId);

    int checkedOrUnchededAllProduct(@Param("userId") Integer userId,@Param("checked") Integer checked);

}